package com.nf.action;

import com.nf.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class Test1 {
    @Autowired
    private CarService carService;

    @RequestMapping("/tt1")
    public String selectCar(Model model){
        System.out.println(carService.getSelectCar());
        model.addAttribute("carList",carService.getSelectCar());
        return "show";
    }
}
